
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>skinning.utils.skin module &#8212; skinning  &#39;&#39; documentation</title>
    <link rel="stylesheet" href="_static/classic.css" type="text/css" />
    <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    './',
        VERSION:     ' &#39;&#39;',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true,
        SOURCELINK_SUFFIX: '.txt'
      };
    </script>
    <script type="text/javascript" src="_static/jquery.js"></script>
    <script type="text/javascript" src="_static/underscore.js"></script>
    <script type="text/javascript" src="_static/doctools.js"></script>
    <link rel="index" title="Index" href="genindex.html" />
    <link rel="search" title="Search" href="search.html" /> 
  </head>
  <body>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">skinning  &#39;&#39; documentation</a> &#187;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body" role="main">
            
  <div class="section" id="module-skinning.utils.skin">
<span id="skinning-utils-skin-module"></span><h1>skinning.utils.skin module<a class="headerlink" href="#module-skinning.utils.skin" title="Permalink to this headline">¶</a></h1>
<dl class="function">
<dt id="skinning.utils.skin.get_cluster">
<code class="descclassname">skinning.utils.skin.</code><code class="descname">get_cluster</code><span class="sig-paren">(</span><em>node</em><span class="sig-paren">)</span><a class="headerlink" href="#skinning.utils.skin.get_cluster" title="Permalink to this definition">¶</a></dt>
<dd><p>Loop over an objects history and return the skin cluster node that is part
of the history. The geometry provided will be extended to its shapes.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>node</strong> (<em>str</em>) – </td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Skin cluster</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">str</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="skinning.utils.skin.get_cluster_fn">
<code class="descclassname">skinning.utils.skin.</code><code class="descname">get_cluster_fn</code><span class="sig-paren">(</span><em>node</em><span class="sig-paren">)</span><a class="headerlink" href="#skinning.utils.skin.get_cluster_fn" title="Permalink to this definition">¶</a></dt>
<dd><p>Loop over an objects history and return the skin cluster api node that
is part dependency graph. The geometry provided will be extended to its
shapes.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>node</strong> (<em>str</em>) – </td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body">Skin cluster</td>
</tr>
<tr class="field-odd field"><th class="field-name">Return type:</th><td class="field-body">OpenMayaAnim.MFnSkinCluster</td>
</tr>
<tr class="field-even field"><th class="field-name">Raises:</th><td class="field-body"><strong>RuntimeError</strong> – When no skin cluster can be found.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="skinning.utils.skin.set_weights">
<code class="descclassname">skinning.utils.skin.</code><code class="descname">set_weights</code><span class="sig-paren">(</span><em>skin_cluster</em>, <em>dag</em>, <em>components</em>, <em>influences</em>, <em>weights_new</em>, <em>weights_old=None</em><span class="sig-paren">)</span><a class="headerlink" href="#skinning.utils.skin.set_weights" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the skin weights via the API but add them to the undo queue using the
apiundo module. If weights old are not provided they are retrieved from
the skin cluster first.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>skin_cluster</strong> (<em>OpenMayaAnim.MFnSkinCluster</em>) – </li>
<li><strong>dag</strong> (<em>OpenMaya.MDagPath</em>) – </li>
<li><strong>components</strong> (<em>OpenMaya.MObject</em>) – </li>
<li><strong>influences</strong> (<em>OpenMaya.MIntArray</em>) – </li>
<li><strong>weights_new</strong> (<em>OpenMaya.MDoubleArray</em>) – </li>
<li><strong>weights_old</strong> (<em>OpenMaya.MDoubleArray</em>) – </li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

</div>


          </div>
        </div>
      </div>
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="_sources/skinning.utils.skin.rst.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <form class="search" action="search.html" method="get">
      <div><input type="text" name="q" /></div>
      <div><input type="submit" value="Go" /></div>
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related" role="navigation" aria-label="related navigation">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="nav-item nav-item-0"><a href="index.html">skinning  &#39;&#39; documentation</a> &#187;</li> 
      </ul>
    </div>
    <div class="footer" role="contentinfo">
        &#169; Copyright 2022, &#39;Robert Joosten&#39;.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.4.
    </div>
  </body>
</html>